import { BaseFightLogic } from "../BaseFightLogic";
import { LifeEnum } from "../enum/LifeEnum";
import IFightFilter from "../strategy/IFightFilter";

/*****************************
 *@file: PermitFind
 *@author: 陈吕唐
 *@desc: 所有允许选择的对象
 *@date: 2024-02-29	09:59
 *****************************/
export default class PermitFilter implements IFightFilter {
    public filter(array: readonly BaseFightLogic[]): BaseFightLogic[] {
        let result = array.filter((item) => {
            return item.lifeState === LifeEnum.LIFE;
        });
        return result;
    }
}